

#ifndef findCornerPoint_hpp
#define findCornerPoint_hpp


#endif /* findCornerPoint_hpp */
#include <opencv2/opencv.hpp>
#include<algorithm>
#include<vector>
#define PI 3.141592653
using namespace cv;
using namespace std;
class FindCornerPoint
{
    
    typedef enum{
        upLeft = 1,
        upRight = 2,
        downLeft = 3,
        downRight = 4,
    }CornerPlace;
private:
    struct Line{
        cv::Point2f _p1;
        cv::Point2f _p2;
        cv::Point2f _center;
        
        Line(cv::Point2f p1, cv::Point2f p2) {
            _p1 = p1;
            _p2 = p2;
            _center = cv::Point2f((p1.x + p2.x) / 2, (p1.y + p2.y) / 2);
        }
        Line(){}
    };
    
    cv::Point2f computeIntersect(Line l1, Line l2);
public:
    bool getCornerInfo(cv::Mat srcImage, cv::Point &cornerPosition, float &turnAngle);
    
    
};

